package com.librarysys.dao;

import com.librarysys.entity.Manager;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ManagerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Manager record);

    int insertSelective(Manager record);

    Manager selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Manager record);

    int updateByPrimaryKey(Manager record);

    Manager selectByNameAndPassword(@Param("name") String name,@Param("password") String password);

    Integer selectByName(String name);

    Integer updateByNameAndPassword(@Param("name") String name,@Param("oldPassword") String oldPassword,@Param("newPassword") String newPassword);

    List<Manager> selectAll();
}